{% extends "admin/index.html" %}
{% load i18n %}

{% block extrahead %}
    <script type="text/javascript" src="/static/js/jquery.autocomplete.js"></script> 
    <script type="text/javascript" src="/static/js/ajax_select.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/css/jquery.autocomplete.css" /> 
    <link rel="stylesheet" type="text/css" href="/static/css/iconic.css" />
    
    {% load adminmedia %}
	<script type="text/javascript" src="/admin/jsi18n/"></script>
	<script type="text/javascript" src="/static/grappelli/js/core.js"></script>
    {{ formset.media }}
{% endblock %}

{% block content %}
	<h2> Add multiple discipline actions </h2>
    <a href="{% url admin:sis_studentdiscipline_changelist %}">View all discipline actions</a>
    <form method="post" action="" id="myform">
       {{ formset.management_form }}
       <div class='table'>
            <table>
                <tbody>
                    <tr>
                        <th>Date</th>
                        <th>Student(s)</th>
                        <th>Set Comments</th>
                        <th>Other Comments</th>
                    </tr>
                    {% for form in formset.forms %}
                    <tr>
                        <td> {{ form.date }} </td>
                        <td> {{ form.students }} </td>
                        <td> {{ form.teacher }} </td>
                        <td> {{ form.infraction }} </td>
                        <td> {{ form.comments }} </td>
                    </tr>
                    {% endfor %} 
                </tbody>
            </table>
        </div>
        <input type="submit" value="Submit"/>   
        <input type="submit" name="addmore" value="Submit and add more"/>        
    </form>
{% endblock %}

